package striveen.util.used.log;

import android.annotation.SuppressLint;

public class Log {
	public static final int VERBOSE = 2;
	public static final int DEBUG = 3;
	public static final int INFO = 4;
	public static final int WARN = 5;
	public static final int ERROR = 6;
	public static final int ASSERT = 7;
	private static boolean isShow = true;

	public static void isShowLog(boolean isShowLog) {
		isShow = isShowLog;
	}

	public static void setIsShowLog(boolean isShowLog) {
		isShowLog(isShowLog);
	}

	public static boolean isShowLog() {
		return isShow;
	}

	public static int v(String tag, String msg) {
		if (isShow) {
			return android.util.Log.v(tag, msg);
		}
		return -1;
	}

	public static int d(String tag, String msg) {
		if (isShow) {
			return android.util.Log.d(tag, msg);
		}
		return -1;
	}

	public static int i(String tag, String msg) {
		if (isShow) {
			return android.util.Log.i(tag, msg);
		}
		return -1;
	}

	public static int w(String tag, String msg) {
		if (isShow) {
			return android.util.Log.w(tag, msg);
		}
		return -1;
	}

	public static int e(String tag, String msg) {
		if (isShow) {
			return android.util.Log.e(tag, msg);
		}
		return -1;
	}

	@SuppressLint({ "NewApi" })
	public static int wtf(String tag, String msg) {
		if (isShow) {
			return android.util.Log.wtf(tag, msg);
		}
		return -1;
	}

	public static int v(String tag, String msg, Throwable tr) {
		if (isShow) {
			return android.util.Log.v(tag, msg, tr);
		}
		return -1;
	}

	public static int d(String tag, String msg, Throwable tr) {
		if (isShow) {
			return android.util.Log.d(tag, msg, tr);
		}
		return -1;
	}

	public static int i(String tag, String msg, Throwable tr) {
		if (isShow) {
			return android.util.Log.i(tag, msg, tr);
		}
		return -1;
	}

	public static int w(String tag, String msg, Throwable tr) {
		if (isShow) {
			return android.util.Log.w(tag, msg, tr);
		}
		return -1;
	}

	public static int e(String tag, String msg, Throwable tr) {
		if (isShow) {
			return android.util.Log.e(tag, msg, tr);
		}
		return -1;
	}

	@SuppressLint({ "NewApi" })
	public static int wtf(String tag, String msg, Throwable tr) {
		if (isShow) {
			return android.util.Log.wtf(tag, msg, tr);
		}
		return -1;
	}

	public static String getStackTraceString(Throwable tr) {
		if (isShow) {
			return android.util.Log.getStackTraceString(tr);
		}
		return null;
	}

	public static int println(int priority, String tag, String msg) {
		if (isShow) {
			return android.util.Log.println(priority, tag, msg);
		}
		return -1;
	}

	public static boolean isLoggable(String tag, int level)
			throws IllegalArgumentException {
		if (isShow) {
			return android.util.Log.isLoggable(tag, level);
		}
		return false;
	}

	public static int w(String tag, Throwable tr) {
		if (isShow) {
			return android.util.Log.w(tag, tr);
		}
		return -1;
	}

	public static int e(String tag, Throwable tr) {
		if (isShow) {
			return android.util.Log.e(tag, "Log a exception", tr);
		}
		return -1;
	}

	@SuppressLint({ "NewApi" })
	public static int wtf(String tag, Throwable tr) {
		if (isShow) {
			return android.util.Log.wtf(tag, tr);
		}
		return -1;
	}
}
